package com.liyiruo.uploadfiles.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;

import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author liyiruo
 * @Description
 * @Date 2024/7/8 上午9:07
 */
@Controller
@RequestMapping("upload")
@Slf4j
public class DragAndDrop2 {

    private static final String UPLOAD_DIR = "files";


    @RequestMapping("/dd2")
    @ResponseBody
    public Map<String, String> hello2(@RequestParam("files[]") MultipartFile[] files){
        log.info("======>{}","进入方法do");
        Map<String, String> stringStringMap = new HashMap<>();
        stringStringMap.put("k", "v");
        return stringStringMap;
    }






}
